/**
 * 加载 <script src> 样式
 * @param src
 */
export var loadScript = function loadScript(src, callback) {
  var script = document.createElement('script');
  script.src = src;
  script.type = 'text/javascript';
  script.onload = function () {
    callback === null || callback === void 0 || callback();
  };
  document.body.appendChild(script);
};

/**
 * 加载 <link href> 样式
 * @param href
 */
export var loadStyle = function loadStyle(href, callback) {
  var link = document.createElement('link');
  link.href = href;
  link.rel = 'stylesheet';
  link.type = 'text/css';
  document.head.appendChild(link);
};